3.244 \(\int (a+a \sin (e+f x)) (A+B \sin (e+f x)) (c+d \sin (e+f x))^3 \, dx\)

Optimal. Leaf size=327 \[ -\frac{a \left (5 A d \left (16 c^2 d+3 c^3+12 c d^2+4 d^3\right )-B \left (-52 c^2 d^2-15 c^3 d+3 c^4-60 c d^3-16 d^4\right )\right ) \cos (e+f x)}{30 d f}-\frac{a \left (5 A d \left (6 c^2+20 c d+9 d^2\right )-B \left (-30 c^2 d+6 c^3-71 c d^2-45 d^3\right )\right ) \sin (e+f x) \cos (e+f x)}{120 f}+\frac{1}{8} a x \left (A \left (12 c^2 d+8 c^3+12 c d^2+3 d^3\right )+B \left (12 c^2 d+4 c^3+9 c d^2+3 d^3\right )\right )-\frac{a \left (4 d^2 (5 A+4 B)-3 c (B c-5 d (A+B))\right ) \cos (e+f x) (c+d \sin (e+f x))^2}{60 d f}+\frac{a (B c-5 d (A+B)) \cos (e+f x) (c+d \sin (e+f x))^3}{20 d f}-\frac{a B \cos (e+f x) (c+d \sin (e+f x))^4}{5 d f} \]

[Out]

(a*(B*(4*c^3 + 12*c^2*d + 9*c*d^2 + 3*d^3) + A*(8*c^3 + 12*c^2*d + 12*c*d^2 + 3*d^3))*x)/8 - (a*(5*A*d*(3*c^3
+ 16*c^2*d + 12*c*d^2 + 4*d^3) - B*(3*c^4 - 15*c^3*d - 52*c^2*d^2 - 60*c*d^3 - 16*d^4))*Cos[e + f*x])/(30*d*f)
 - (a*(5*A*d*(6*c^2 + 20*c*d + 9*d^2) - B*(6*c^3 - 30*c^2*d - 71*c*d^2 - 45*d^3))*Cos[e + f*x]*Sin[e + f*x])/(
120*f) - (a*(4*(5*A + 4*B)*d^2 - 3*c*(B*c - 5*(A + B)*d))*Cos[e + f*x]*(c + d*Sin[e + f*x])^2)/(60*d*f) + (a*(
B*c - 5*(A + B)*d)*Cos[e + f*x]*(c + d*Sin[e + f*x])^3)/(20*d*f) - (a*B*Cos[e + f*x]*(c + d*Sin[e + f*x])^4)/(
5*d*f)

________________________________________________________________________________________

Rubi [A]  time = 0.579065, antiderivative size = 327, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 33, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.121, Rules used = {2968, 3023, 2753, 2734} \[ -\frac{a \left (5 A d \left (16 c^2 d+3 c^3+12 c d^2+4 d^3\right )-B \left (-52 c^2 d^2-15 c^3 d+3 c^4-60 c d^3-16 d^4\right )\right ) \cos (e+f x)}{30 d f}-\frac{a \left (5 A d \left (6 c^2+20 c d+9 d^2\right )-B \left (-30 c^2 d+6 c^3-71 c d^2-45 d^3\right )\right ) \sin (e+f x) \cos (e+f x)}{120 f}+\frac{1}{8} a x \left (A \left (12 c^2 d+8 c^3+12 c d^2+3 d^3\right )+B \left (12 c^2 d+4 c^3+9 c d^2+3 d^3\right )\right )-\frac{a \left (4 d^2 (5 A+4 B)-3 c (B c-5 d (A+B))\right ) \cos (e+f x) (c+d \sin (e+f x))^2}{60 d f}+\frac{a (B c-5 d (A+B)) \cos (e+f x) (c+d \sin (e+f x))^3}{20 d f}-\frac{a B \cos (e+f x) (c+d \sin (e+f x))^4}{5 d f} \]

Antiderivative was successfully verified.

[In]

Int[(a + a*Sin[e + f*x])*(A + B*Sin[e + f*x])*(c + d*Sin[e + f*x])^3,x]

[Out]

(a*(B*(4*c^3 + 12*c^2*d + 9*c*d^2 + 3*d^3) + A*(8*c^3 + 12*c^2*d + 12*c*d^2 + 3*d^3))*x)/8 - (a*(5*A*d*(3*c^3
+ 16*c^2*d + 12*c*d^2 + 4*d^3) - B*(3*c^4 - 15*c^3*d - 52*c^2*d^2 - 60*c*d^3 - 16*d^4))*Cos[e + f*x])/(30*d*f)
 - (a*(5*A*d*(6*c^2 + 20*c*d + 9*d^2) - B*(6*c^3 - 30*c^2*d - 71*c*d^2 - 45*d^3))*Cos[e + f*x]*Sin[e + f*x])/(
120*f) - (a*(4*(5*A + 4*B)*d^2 - 3*c*(B*c - 5*(A + B)*d))*Cos[e + f*x]*(c + d*Sin[e + f*x])^2)/(60*d*f) + (a*(
B*c - 5*(A + B)*d)*Cos[e + f*x]*(c + d*Sin[e + f*x])^3)/(20*d*f) - (a*B*Cos[e + f*x]*(c + d*Sin[e + f*x])^4)/(
5*d*f)

Rule 2968

Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(
e_.) + (f_.)*(x_)]), x_Symbol] :> Int[(a + b*Sin[e + f*x])^m*(A*c + (B*c + A*d)*Sin[e + f*x] + B*d*Sin[e + f*x
]^2), x] /; FreeQ[{a, b, c, d, e, f, A, B, m}, x] && NeQ[b*c - a*d, 0]

Rule 3023

Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (
f_.)*(x_)]^2), x_Symbol] :> -Simp[(C*Cos[e + f*x]*(a + b*Sin[e + f*x])^(m + 1))/(b*f*(m + 2)), x] + Dist[1/(b*
(m + 2)), Int[(a + b*Sin[e + f*x])^m*Simp[A*b*(m + 2) + b*C*(m + 1) + (b*B*(m + 2) - a*C)*Sin[e + f*x], x], x]
, x] /; FreeQ[{a, b, e, f, A, B, C, m}, x] &&  !LtQ[m, -1]

Rule 2753

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> -Simp[(d
*Cos[e + f*x]*(a + b*Sin[e + f*x])^m)/(f*(m + 1)), x] + Dist[1/(m + 1), Int[(a + b*Sin[e + f*x])^(m - 1)*Simp[
b*d*m + a*c*(m + 1) + (a*d*m + b*c*(m + 1))*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*
c - a*d, 0] && NeQ[a^2 - b^2, 0] && GtQ[m, 0] && IntegerQ[2*m]

Rule 2734

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[((2*a*c
+ b*d)*x)/2, x] + (-Simp[((b*c + a*d)*Cos[e + f*x])/f, x] - Simp[(b*d*Cos[e + f*x]*Sin[e + f*x])/(2*f), x]) /;
 FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0]

Rubi steps

\begin{align*} \int (a+a \sin (e+f x)) (A+B \sin (e+f x)) (c+d \sin (e+f x))^3 \, dx &=\int (c+d \sin (e+f x))^3 \left (a A+(a A+a B) \sin (e+f x)+a B \sin ^2(e+f x)\right ) \, dx\\ &=-\frac{a B \cos (e+f x) (c+d \sin (e+f x))^4}{5 d f}+\frac{\int (c+d \sin (e+f x))^3 (a (5 A+4 B) d-a (B c-5 (A+B) d) \sin (e+f x)) \, dx}{5 d}\\ &=\frac{a (B c-5 (A+B) d) \cos (e+f x) (c+d \sin (e+f x))^3}{20 d f}-\frac{a B \cos (e+f x) (c+d \sin (e+f x))^4}{5 d f}+\frac{\int (c+d \sin (e+f x))^2 \left (a d (20 A c+13 B c+15 A d+15 B d)+a \left (4 (5 A+4 B) d^2-3 c (B c-5 (A+B) d)\right ) \sin (e+f x)\right ) \, dx}{20 d}\\ &=-\frac{a \left (4 (5 A+4 B) d^2-3 c (B c-5 (A+B) d)\right ) \cos (e+f x) (c+d \sin (e+f x))^2}{60 d f}+\frac{a (B c-5 (A+B) d) \cos (e+f x) (c+d \sin (e+f x))^3}{20 d f}-\frac{a B \cos (e+f x) (c+d \sin (e+f x))^4}{5 d f}+\frac{\int (c+d \sin (e+f x)) \left (a d \left (60 A c^2+33 B c^2+75 A c d+75 B c d+40 A d^2+32 B d^2\right )+a \left (5 A d \left (6 c^2+20 c d+9 d^2\right )-B \left (6 c^3-30 c^2 d-71 c d^2-45 d^3\right )\right ) \sin (e+f x)\right ) \, dx}{60 d}\\ &=\frac{1}{8} a \left (B \left (4 c^3+12 c^2 d+9 c d^2+3 d^3\right )+A \left (8 c^3+12 c^2 d+12 c d^2+3 d^3\right )\right ) x-\frac{a \left (5 A d \left (3 c^3+16 c^2 d+12 c d^2+4 d^3\right )-B \left (3 c^4-15 c^3 d-52 c^2 d^2-60 c d^3-16 d^4\right )\right ) \cos (e+f x)}{30 d f}-\frac{a \left (5 A d \left (6 c^2+20 c d+9 d^2\right )-B \left (6 c^3-30 c^2 d-71 c d^2-45 d^3\right )\right ) \cos (e+f x) \sin (e+f x)}{120 f}-\frac{a \left (4 (5 A+4 B) d^2-3 c (B c-5 (A+B) d)\right ) \cos (e+f x) (c+d \sin (e+f x))^2}{60 d f}+\frac{a (B c-5 (A+B) d) \cos (e+f x) (c+d \sin (e+f x))^3}{20 d f}-\frac{a B \cos (e+f x) (c+d \sin (e+f x))^4}{5 d f}\\ \end{align*}

Mathematica [A]  time = 2.02801, size = 267, normalized size = 0.82 \[ \frac{a (\sin (e+f x)+1) \left (15 \left (-8 \left (A d \left (3 c^2+3 c d+d^2\right )+B (c+d)^3\right ) \sin (2 (e+f x))+4 f x \left (A \left (12 c^2 d+8 c^3+12 c d^2+3 d^3\right )+B \left (12 c^2 d+4 c^3+9 c d^2+3 d^3\right )\right )+d^2 (A d+B (3 c+d)) \sin (4 (e+f x))\right )+10 d \left (4 A d (3 c+d)+B \left (12 c^2+12 c d+5 d^2\right )\right ) \cos (3 (e+f x))-60 \left (2 A \left (12 c^2 d+4 c^3+9 c d^2+3 d^3\right )+B \left (18 c^2 d+8 c^3+18 c d^2+5 d^3\right )\right ) \cos (e+f x)-6 B d^3 \cos (5 (e+f x))\right )}{480 f \left (\sin \left (\frac{1}{2} (e+f x)\right )+\cos \left (\frac{1}{2} (e+f x)\right )\right )^2} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + a*Sin[e + f*x])*(A + B*Sin[e + f*x])*(c + d*Sin[e + f*x])^3,x]

[Out]

(a*(1 + Sin[e + f*x])*(-60*(2*A*(4*c^3 + 12*c^2*d + 9*c*d^2 + 3*d^3) + B*(8*c^3 + 18*c^2*d + 18*c*d^2 + 5*d^3)
)*Cos[e + f*x] + 10*d*(4*A*d*(3*c + d) + B*(12*c^2 + 12*c*d + 5*d^2))*Cos[3*(e + f*x)] - 6*B*d^3*Cos[5*(e + f*
x)] + 15*(4*(B*(4*c^3 + 12*c^2*d + 9*c*d^2 + 3*d^3) + A*(8*c^3 + 12*c^2*d + 12*c*d^2 + 3*d^3))*f*x - 8*(B*(c +
 d)^3 + A*d*(3*c^2 + 3*c*d + d^2))*Sin[2*(e + f*x)] + d^2*(A*d + B*(3*c + d))*Sin[4*(e + f*x)])))/(480*f*(Cos[
(e + f*x)/2] + Sin[(e + f*x)/2])^2)

________________________________________________________________________________________

Maple [A]  time = 0.069, size = 422, normalized size = 1.3 \begin{align*}{\frac{1}{f} \left ( -A{c}^{3}a\cos \left ( fx+e \right ) +3\,A{c}^{2}da \left ( -1/2\,\sin \left ( fx+e \right ) \cos \left ( fx+e \right ) +1/2\,fx+e/2 \right ) -Ac{d}^{2}a \left ( 2+ \left ( \sin \left ( fx+e \right ) \right ) ^{2} \right ) \cos \left ( fx+e \right ) +A{d}^{3}a \left ( -{\frac{\cos \left ( fx+e \right ) }{4} \left ( \left ( \sin \left ( fx+e \right ) \right ) ^{3}+{\frac{3\,\sin \left ( fx+e \right ) }{2}} \right ) }+{\frac{3\,fx}{8}}+{\frac{3\,e}{8}} \right ) +B{c}^{3}a \left ( -{\frac{\sin \left ( fx+e \right ) \cos \left ( fx+e \right ) }{2}}+{\frac{fx}{2}}+{\frac{e}{2}} \right ) -B{c}^{2}da \left ( 2+ \left ( \sin \left ( fx+e \right ) \right ) ^{2} \right ) \cos \left ( fx+e \right ) +3\,Bc{d}^{2}a \left ( -1/4\, \left ( \left ( \sin \left ( fx+e \right ) \right ) ^{3}+3/2\,\sin \left ( fx+e \right ) \right ) \cos \left ( fx+e \right ) +3/8\,fx+3/8\,e \right ) -{\frac{B{d}^{3}a\cos \left ( fx+e \right ) }{5} \left ({\frac{8}{3}}+ \left ( \sin \left ( fx+e \right ) \right ) ^{4}+{\frac{4\, \left ( \sin \left ( fx+e \right ) \right ) ^{2}}{3}} \right ) }+A{c}^{3}a \left ( fx+e \right ) -3\,A{c}^{2}da\cos \left ( fx+e \right ) +3\,Ac{d}^{2}a \left ( -1/2\,\sin \left ( fx+e \right ) \cos \left ( fx+e \right ) +1/2\,fx+e/2 \right ) -{\frac{A{d}^{3}a \left ( 2+ \left ( \sin \left ( fx+e \right ) \right ) ^{2} \right ) \cos \left ( fx+e \right ) }{3}}-B{c}^{3}a\cos \left ( fx+e \right ) +3\,B{c}^{2}da \left ( -1/2\,\sin \left ( fx+e \right ) \cos \left ( fx+e \right ) +1/2\,fx+e/2 \right ) -Bc{d}^{2}a \left ( 2+ \left ( \sin \left ( fx+e \right ) \right ) ^{2} \right ) \cos \left ( fx+e \right ) +B{d}^{3}a \left ( -{\frac{\cos \left ( fx+e \right ) }{4} \left ( \left ( \sin \left ( fx+e \right ) \right ) ^{3}+{\frac{3\,\sin \left ( fx+e \right ) }{2}} \right ) }+{\frac{3\,fx}{8}}+{\frac{3\,e}{8}} \right ) \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+a*sin(f*x+e))*(A+B*sin(f*x+e))*(c+d*sin(f*x+e))^3,x)

[Out]

1/f*(-A*c^3*a*cos(f*x+e)+3*A*c^2*d*a*(-1/2*sin(f*x+e)*cos(f*x+e)+1/2*f*x+1/2*e)-A*c*d^2*a*(2+sin(f*x+e)^2)*cos
(f*x+e)+A*d^3*a*(-1/4*(sin(f*x+e)^3+3/2*sin(f*x+e))*cos(f*x+e)+3/8*f*x+3/8*e)+B*c^3*a*(-1/2*sin(f*x+e)*cos(f*x
+e)+1/2*f*x+1/2*e)-B*c^2*d*a*(2+sin(f*x+e)^2)*cos(f*x+e)+3*B*c*d^2*a*(-1/4*(sin(f*x+e)^3+3/2*sin(f*x+e))*cos(f
*x+e)+3/8*f*x+3/8*e)-1/5*B*d^3*a*(8/3+sin(f*x+e)^4+4/3*sin(f*x+e)^2)*cos(f*x+e)+A*c^3*a*(f*x+e)-3*A*c^2*d*a*co
s(f*x+e)+3*A*c*d^2*a*(-1/2*sin(f*x+e)*cos(f*x+e)+1/2*f*x+1/2*e)-1/3*A*d^3*a*(2+sin(f*x+e)^2)*cos(f*x+e)-B*c^3*
a*cos(f*x+e)+3*B*c^2*d*a*(-1/2*sin(f*x+e)*cos(f*x+e)+1/2*f*x+1/2*e)-B*c*d^2*a*(2+sin(f*x+e)^2)*cos(f*x+e)+B*d^
3*a*(-1/4*(sin(f*x+e)^3+3/2*sin(f*x+e))*cos(f*x+e)+3/8*f*x+3/8*e))

________________________________________________________________________________________

Maxima [A]  time = 1.01289, size = 548, normalized size = 1.68 \begin{align*} \frac{480 \,{\left (f x + e\right )} A a c^{3} + 120 \,{\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} B a c^{3} + 360 \,{\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} A a c^{2} d + 480 \,{\left (\cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )\right )} B a c^{2} d + 360 \,{\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} B a c^{2} d + 480 \,{\left (\cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )\right )} A a c d^{2} + 360 \,{\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} A a c d^{2} + 480 \,{\left (\cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )\right )} B a c d^{2} + 45 \,{\left (12 \, f x + 12 \, e + \sin \left (4 \, f x + 4 \, e\right ) - 8 \, \sin \left (2 \, f x + 2 \, e\right )\right )} B a c d^{2} + 160 \,{\left (\cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )\right )} A a d^{3} + 15 \,{\left (12 \, f x + 12 \, e + \sin \left (4 \, f x + 4 \, e\right ) - 8 \, \sin \left (2 \, f x + 2 \, e\right )\right )} A a d^{3} - 32 \,{\left (3 \, \cos \left (f x + e\right )^{5} - 10 \, \cos \left (f x + e\right )^{3} + 15 \, \cos \left (f x + e\right )\right )} B a d^{3} + 15 \,{\left (12 \, f x + 12 \, e + \sin \left (4 \, f x + 4 \, e\right ) - 8 \, \sin \left (2 \, f x + 2 \, e\right )\right )} B a d^{3} - 480 \, A a c^{3} \cos \left (f x + e\right ) - 480 \, B a c^{3} \cos \left (f x + e\right ) - 1440 \, A a c^{2} d \cos \left (f x + e\right )}{480 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))*(A+B*sin(f*x+e))*(c+d*sin(f*x+e))^3,x, algorithm="maxima")

[Out]

1/480*(480*(f*x + e)*A*a*c^3 + 120*(2*f*x + 2*e - sin(2*f*x + 2*e))*B*a*c^3 + 360*(2*f*x + 2*e - sin(2*f*x + 2
*e))*A*a*c^2*d + 480*(cos(f*x + e)^3 - 3*cos(f*x + e))*B*a*c^2*d + 360*(2*f*x + 2*e - sin(2*f*x + 2*e))*B*a*c^
2*d + 480*(cos(f*x + e)^3 - 3*cos(f*x + e))*A*a*c*d^2 + 360*(2*f*x + 2*e - sin(2*f*x + 2*e))*A*a*c*d^2 + 480*(
cos(f*x + e)^3 - 3*cos(f*x + e))*B*a*c*d^2 + 45*(12*f*x + 12*e + sin(4*f*x + 4*e) - 8*sin(2*f*x + 2*e))*B*a*c*
d^2 + 160*(cos(f*x + e)^3 - 3*cos(f*x + e))*A*a*d^3 + 15*(12*f*x + 12*e + sin(4*f*x + 4*e) - 8*sin(2*f*x + 2*e
))*A*a*d^3 - 32*(3*cos(f*x + e)^5 - 10*cos(f*x + e)^3 + 15*cos(f*x + e))*B*a*d^3 + 15*(12*f*x + 12*e + sin(4*f
*x + 4*e) - 8*sin(2*f*x + 2*e))*B*a*d^3 - 480*A*a*c^3*cos(f*x + e) - 480*B*a*c^3*cos(f*x + e) - 1440*A*a*c^2*d
*cos(f*x + e))/f

________________________________________________________________________________________

Fricas [A]  time = 2.22948, size = 608, normalized size = 1.86 \begin{align*} -\frac{24 \, B a d^{3} \cos \left (f x + e\right )^{5} - 40 \,{\left (3 \, B a c^{2} d + 3 \,{\left (A + B\right )} a c d^{2} +{\left (A + 2 \, B\right )} a d^{3}\right )} \cos \left (f x + e\right )^{3} - 15 \,{\left (4 \,{\left (2 \, A + B\right )} a c^{3} + 12 \,{\left (A + B\right )} a c^{2} d + 3 \,{\left (4 \, A + 3 \, B\right )} a c d^{2} + 3 \,{\left (A + B\right )} a d^{3}\right )} f x + 120 \,{\left ({\left (A + B\right )} a c^{3} + 3 \,{\left (A + B\right )} a c^{2} d + 3 \,{\left (A + B\right )} a c d^{2} +{\left (A + B\right )} a d^{3}\right )} \cos \left (f x + e\right ) - 15 \,{\left (2 \,{\left (3 \, B a c d^{2} +{\left (A + B\right )} a d^{3}\right )} \cos \left (f x + e\right )^{3} -{\left (4 \, B a c^{3} + 12 \,{\left (A + B\right )} a c^{2} d + 3 \,{\left (4 \, A + 5 \, B\right )} a c d^{2} + 5 \,{\left (A + B\right )} a d^{3}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{120 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))*(A+B*sin(f*x+e))*(c+d*sin(f*x+e))^3,x, algorithm="fricas")

[Out]

-1/120*(24*B*a*d^3*cos(f*x + e)^5 - 40*(3*B*a*c^2*d + 3*(A + B)*a*c*d^2 + (A + 2*B)*a*d^3)*cos(f*x + e)^3 - 15
*(4*(2*A + B)*a*c^3 + 12*(A + B)*a*c^2*d + 3*(4*A + 3*B)*a*c*d^2 + 3*(A + B)*a*d^3)*f*x + 120*((A + B)*a*c^3 +
 3*(A + B)*a*c^2*d + 3*(A + B)*a*c*d^2 + (A + B)*a*d^3)*cos(f*x + e) - 15*(2*(3*B*a*c*d^2 + (A + B)*a*d^3)*cos
(f*x + e)^3 - (4*B*a*c^3 + 12*(A + B)*a*c^2*d + 3*(4*A + 5*B)*a*c*d^2 + 5*(A + B)*a*d^3)*cos(f*x + e))*sin(f*x
 + e))/f

________________________________________________________________________________________

Sympy [A]  time = 7.87179, size = 996, normalized size = 3.05 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))*(A+B*sin(f*x+e))*(c+d*sin(f*x+e))**3,x)

[Out]

Piecewise((A*a*c**3*x - A*a*c**3*cos(e + f*x)/f + 3*A*a*c**2*d*x*sin(e + f*x)**2/2 + 3*A*a*c**2*d*x*cos(e + f*
x)**2/2 - 3*A*a*c**2*d*sin(e + f*x)*cos(e + f*x)/(2*f) - 3*A*a*c**2*d*cos(e + f*x)/f + 3*A*a*c*d**2*x*sin(e +
f*x)**2/2 + 3*A*a*c*d**2*x*cos(e + f*x)**2/2 - 3*A*a*c*d**2*sin(e + f*x)**2*cos(e + f*x)/f - 3*A*a*c*d**2*sin(
e + f*x)*cos(e + f*x)/(2*f) - 2*A*a*c*d**2*cos(e + f*x)**3/f + 3*A*a*d**3*x*sin(e + f*x)**4/8 + 3*A*a*d**3*x*s
in(e + f*x)**2*cos(e + f*x)**2/4 + 3*A*a*d**3*x*cos(e + f*x)**4/8 - 5*A*a*d**3*sin(e + f*x)**3*cos(e + f*x)/(8
*f) - A*a*d**3*sin(e + f*x)**2*cos(e + f*x)/f - 3*A*a*d**3*sin(e + f*x)*cos(e + f*x)**3/(8*f) - 2*A*a*d**3*cos
(e + f*x)**3/(3*f) + B*a*c**3*x*sin(e + f*x)**2/2 + B*a*c**3*x*cos(e + f*x)**2/2 - B*a*c**3*sin(e + f*x)*cos(e
 + f*x)/(2*f) - B*a*c**3*cos(e + f*x)/f + 3*B*a*c**2*d*x*sin(e + f*x)**2/2 + 3*B*a*c**2*d*x*cos(e + f*x)**2/2
- 3*B*a*c**2*d*sin(e + f*x)**2*cos(e + f*x)/f - 3*B*a*c**2*d*sin(e + f*x)*cos(e + f*x)/(2*f) - 2*B*a*c**2*d*co
s(e + f*x)**3/f + 9*B*a*c*d**2*x*sin(e + f*x)**4/8 + 9*B*a*c*d**2*x*sin(e + f*x)**2*cos(e + f*x)**2/4 + 9*B*a*
c*d**2*x*cos(e + f*x)**4/8 - 15*B*a*c*d**2*sin(e + f*x)**3*cos(e + f*x)/(8*f) - 3*B*a*c*d**2*sin(e + f*x)**2*c
os(e + f*x)/f - 9*B*a*c*d**2*sin(e + f*x)*cos(e + f*x)**3/(8*f) - 2*B*a*c*d**2*cos(e + f*x)**3/f + 3*B*a*d**3*
x*sin(e + f*x)**4/8 + 3*B*a*d**3*x*sin(e + f*x)**2*cos(e + f*x)**2/4 + 3*B*a*d**3*x*cos(e + f*x)**4/8 - B*a*d*
*3*sin(e + f*x)**4*cos(e + f*x)/f - 5*B*a*d**3*sin(e + f*x)**3*cos(e + f*x)/(8*f) - 4*B*a*d**3*sin(e + f*x)**2
*cos(e + f*x)**3/(3*f) - 3*B*a*d**3*sin(e + f*x)*cos(e + f*x)**3/(8*f) - 8*B*a*d**3*cos(e + f*x)**5/(15*f), Ne
(f, 0)), (x*(A + B*sin(e))*(c + d*sin(e))**3*(a*sin(e) + a), True))

________________________________________________________________________________________

Giac [A]  time = 1.15537, size = 424, normalized size = 1.3 \begin{align*} -\frac{B a d^{3} \cos \left (5 \, f x + 5 \, e\right )}{80 \, f} + \frac{1}{8} \,{\left (8 \, A a c^{3} + 4 \, B a c^{3} + 12 \, A a c^{2} d + 12 \, B a c^{2} d + 12 \, A a c d^{2} + 9 \, B a c d^{2} + 3 \, A a d^{3} + 3 \, B a d^{3}\right )} x + \frac{{\left (12 \, B a c^{2} d + 12 \, A a c d^{2} + 12 \, B a c d^{2} + 4 \, A a d^{3} + 5 \, B a d^{3}\right )} \cos \left (3 \, f x + 3 \, e\right )}{48 \, f} - \frac{{\left (8 \, A a c^{3} + 8 \, B a c^{3} + 24 \, A a c^{2} d + 18 \, B a c^{2} d + 18 \, A a c d^{2} + 18 \, B a c d^{2} + 6 \, A a d^{3} + 5 \, B a d^{3}\right )} \cos \left (f x + e\right )}{8 \, f} + \frac{{\left (3 \, B a c d^{2} + A a d^{3} + B a d^{3}\right )} \sin \left (4 \, f x + 4 \, e\right )}{32 \, f} - \frac{{\left (B a c^{3} + 3 \, A a c^{2} d + 3 \, B a c^{2} d + 3 \, A a c d^{2} + 3 \, B a c d^{2} + A a d^{3} + B a d^{3}\right )} \sin \left (2 \, f x + 2 \, e\right )}{4 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))*(A+B*sin(f*x+e))*(c+d*sin(f*x+e))^3,x, algorithm="giac")

[Out]

-1/80*B*a*d^3*cos(5*f*x + 5*e)/f + 1/8*(8*A*a*c^3 + 4*B*a*c^3 + 12*A*a*c^2*d + 12*B*a*c^2*d + 12*A*a*c*d^2 + 9
*B*a*c*d^2 + 3*A*a*d^3 + 3*B*a*d^3)*x + 1/48*(12*B*a*c^2*d + 12*A*a*c*d^2 + 12*B*a*c*d^2 + 4*A*a*d^3 + 5*B*a*d
^3)*cos(3*f*x + 3*e)/f - 1/8*(8*A*a*c^3 + 8*B*a*c^3 + 24*A*a*c^2*d + 18*B*a*c^2*d + 18*A*a*c*d^2 + 18*B*a*c*d^
2 + 6*A*a*d^3 + 5*B*a*d^3)*cos(f*x + e)/f + 1/32*(3*B*a*c*d^2 + A*a*d^3 + B*a*d^3)*sin(4*f*x + 4*e)/f - 1/4*(B
*a*c^3 + 3*A*a*c^2*d + 3*B*a*c^2*d + 3*A*a*c*d^2 + 3*B*a*c*d^2 + A*a*d^3 + B*a*d^3)*sin(2*f*x + 2*e)/f